package ruiFight.collect.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ruiFight.collect.dao.UsersMapper;
import ruiFight.collect.model.Users;
import ruiFight.collect.service.base.BaseServiceImpl;

/**
 * @author Administrator
 */
@Service
public class UsersServiceImpl extends BaseServiceImpl<Users,Integer> implements UsersService {

    @Resource
    private UsersMapper usersMapper;
//    @Resource
//    private TenementMapper tenementMapper;
//    @Resource
//    private HousemessgeMapper housemessgeMapper;

	@Override
	public List<Users> findUserByCondition(Users users) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer findUserCountByCondition(Users users) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Map<String, Object>> findStatisticalUserCount(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Map<String, Object>> findStatisticalUserCountByGLZ(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Map<String, Object>> getUserList(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer getUserCount(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer getUsersCount(Integer usersId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer delUsersAddress(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer insertUsersAddress(Map<String, Object> paramMap) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Users verifyUsers(String idNo) {
		// TODO Auto-generated method stub
		return null;
	}
    
//    public List<Users> findUserByCondition(Users users) {
//        List<Users> users1 = usersMapper.findUserByCondition(users);
//        return users1;
//    }
//
//    public Integer findUserCountByCondition(Users users) {
//        int k = usersMapper.findUserCountByCondition(users);
//        return k;
//    }
//
//	public List<Map<String, Object>> findStatisticalUserCount(Map<String, Object> paramMap) {
//		return usersMapper.findStatisticalUserCount(paramMap);
//	}
//
//	@Override
//	public List<Map<String, Object>> findStatisticalUserCountByGLZ(Map<String, Object> paramMap) {
//		// TODO Auto-generated method stub
//		return usersMapper.findStatisticalUserCountByGLZ(paramMap);
//	}
//	
//    public List<Map<String,Object>> getUserList(Map<String, Object> paramMap) {
//    	List<Map<String,Object>> map = usersMapper.getUserList(paramMap);
//        return map;
//    }
//
//    public Integer getUserCount(Map<String, Object> paramMap) {
//        int k = usersMapper.getUserCount(paramMap);
//        return k;
//    }
//
//	@Override
//	@Transactional(rollbackFor=Exception.class)
//	public void addOrUpdateLJUser(Users users, Tenement tenement) {
//		usersMapper.updateByPrimaryKeySelective(users);
//		Tenement paramTenement=new Tenement();
//        paramTenement.setUsersId(users.getId());
//        paramTenement.setStartPage(0);
//        paramTenement.setPageSize(1);
//        //添加或修改来京人员具体信息
//        List<Tenement> dataList=tenementMapper.findTenementByCondition(paramTenement);
//        if(dataList!=null&&dataList.size()>0){
//     	   tenement.setId(dataList.get(0).getId());
//     	   tenementMapper.updateByPrimaryKeySelective(tenement);
//        }else{
//        	tenementMapper.insertSelective(tenement);
//        }
//        //判断任务是否完成
//        Housemessge housemessge=housemessgeMapper.findHouseMessgeByUsersId(users.getId());
//        if(housemessge.getState()==3){
//        	int dwellNumber=housemessge.getDwellNumber();
//        	Integer count=usersMapper.findUsersCountByHouseMessgeId(housemessge.getId());
//            if(dwellNumber<=count){
//            	housemessge.setState(4);
//            	housemessgeMapper.updateByPrimaryKeySelective(housemessge);
//            }	
//        }
//        
//	}
//	
//	public Integer getUsersCount(Integer usersId) {
//		return usersMapper.getUsersCount(usersId);
//	}
//	
//	public Integer delUsersAddress(Map<String, Object> paramMap) {
//		return usersMapper.delUsersAddress(paramMap);
//	}
//	
//	public Integer insertUsersAddress(Map<String, Object> paramMap) {
//		Integer i=0;
//		int count =usersMapper.getUsersAddressCount(paramMap);
//		if(count<=0){
//			i=usersMapper.insertUsersAddress(paramMap);
//		}
//		return i;
//	}
//	public Users verifyUsers(String idNo) {
//		return usersMapper.verifyUsers(idNo);
//	}
}
